A Categorical Theory of Patches

نویسندگان

  • Samuel Mimram
  • Cinzia Di Giusto
چکیده

When working with distant collaborators on the same files, one often uses a distributed version control system, which is a program tracking the history of files and helps importing modifications brought by others as patches. The implementation of such a system requires to handle lots of situations depending on the operations users have performed on files, and it is thus difficult to ensure that all the corner cases have been correctly addressed. Here, instead of verifying the implementation of such a system, we adopt a “converse” approach: we introduce a theoretical model, which is defined abstractly by the universal property that it should satisfy, and work out a concrete description of it. We begin by defining a category of files and patches, where the operation of merging the effect of two coinitial patches is defined by pushout. Since the category is not closed under pushouts (two patches can be incompatible), in order to still be able to represent and manipulate files in conflicting states, we investigate the free completion of the category of files under finite colimits, which preserves existing colimits, and provide an explicit description of this category. Finally, we introduce a formalization of repositories based on event structures and discuss various generalizations of the model. It is common nowadays, when working with distant collaborators on the same files (multiple authors writing an article together for instance), to use a program which will track the history of files and handle the operation of importing modifications of the other participants. This software, called a version control system (VCS), implements two main operations. When a user is happy with the changes it has brought to the files it can record those changes in a patch (a file coding the differences between the current version and the last recorded version) and commit them to a server, called a repository. The user can also update its current version of the file by importing new patches added by other users to the repository and applying the corresponding modifications to the files. The first implementations of VCS (such as CVS or subversion) were based on a central server acting as unique repository, but this architecture is often considered as too rigid: if the server fails or if there is no internet connection the VCS cannot be used, also people would like to be able to run their own local VCS in order to perform experiments, etc. This is why modern implementations are distributed and called DVCS (for instance git, mercurial or Darcs): any participant acts as a local repository and patches can be imported from repositories to repositories. One of the main difficulty brought by this decentralized approach is that there is no global notion of time since there is no reference server, and created patches are only partially ordered in time. For instance consider a repository with one file A and two users u1 and u2. Suppose that u1 modifies the file A into B by committing a patch f , which is then imported by u2, and then u1 and u2 concurrently modify the file B into C (resp. D) by committing a patch g (resp. h). The evolution of the file is depicted on the left and the partial ordering of patches on the right:

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A History of Selected Topics in Categorical Algebra I: From Galois Theory to Abstract Commutators and Internal Groupoids

This paper is a chronological survey, with no proofs, of a direction in categorical algebra, which is based on categorical Galois theory and involves generalized central extensions, commutators, and internal groupoids in Barr exact Mal’tsev and more general categories. Galois theory proposes a notion of central extension, and motivates the study of internal groupoids, which is then used as an a...

متن کامل

Assessment of Landscape Connectivity and Prediction of Migration Corridors for the Baluchistan Black Bear (Ursus thibetanus gedrosianus Blanford, 1877) in the Southeastern Habitats, Iran

The Baluchistan Black Bear (BBB), a critically endangered subspecies (CR), is distributed in the southeastern Iran. Modelling of landscape connectivity of the BBBs among habitat patches can be insightful for the conservation managers working in Iran. Our study was designed to identify the potential corridors among 31 habitat patches of the BBBs in Iran using the circuit theory method. Habitat s...

متن کامل

ارزیابی پیوستگی اکولوژیک لکه‌های سبز شهری با استفاده از تئوری گراف،مطالعه موردی کلان‌شهر اهواز

Connectivity of urban green patches is an important structural attribute of urban landscape that facilitates the species movement and transfer of their genes among their habitats. So far, several methods including Graph Theory have been applied to assess ecological connectivity. This research was aimed  to study the application of graph theory to measure the connectivity of green patches in the...

متن کامل

Toward Gleasonian Landscape Ecology: From Communities to Species, From Patches to Pixels

The fusion of individualistic community ecology with the Hutchinsonian niche concept enabled a broad integration of ecological theory, spanning all the way from the niche characteristics of individual species, to the composition, structure, and dynamics of ecological communities. Landscape ecology has been variously described as the study of the structure, function, and management of large hete...

متن کامل

LQG vibration control of sandwich beams with transversely flexible core equipped with piezoelectric patches

The purpose of this paper is control of simply supported flexible core sandwich beam's linear vibration equipped with piezoelectric patches under different loads. The effects of external forces imposed on sandwich beam can be reached to a minimum value by designing an appropriate controller and control the beam's vibration. Three-layer sandwich beam theory is used for analytical modeling of san...

متن کامل

Analysis of Natural Frequencies for a Laminated Composite Plate with Piezoelectric Patches using the First and Second Eigenvalue Derivatives

In this paper, the first and second order approximations of Taylor expansion are used for calculating the change of each natural frequency by modifying an arbitrary parameter of a system with a known amount and based on this approximation, the inverse eigenvalue problem is transformed to a solvable algebraic equation. The finite element formulation, based on the classical laminated plate theory...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • Electr. Notes Theor. Comput. Sci.

دوره 298  شماره 

صفحات  -

تاریخ انتشار 2013